from .views import goods, auction, user, shops, order, reports, noticeC, noticeS, eureka, staff
from django.conf.urls import url

urlpatterns = [
    url(r'^(?P<version>[v1]+)/menu/$', goods.MenuView.as_view({'get': 'list', 'post': 'create'})),
    url(r'^(?P<version>[v1]+)/menu/(?P<pk>\d+)$',
        goods.MenuView.as_view({'get': 'retrieve', 'delete': 'destroy', 'put': 'update', 'patch': 'partial_update'})),
    url(r'^(?P<version>[v1]+)/detail/$', goods.DetailView.as_view({'post': 'create'})),
    url(r'^(?P<version>[v1]+)/detail/(?P<pk>\d+)$', goods.DetailView.as_view({'get': 'retrieve', 'put': 'update'})),
    url(r'^(?P<version>[v1]+)/test/$', goods.TestView.as_view()),
    url(r'^(?P<version>[v1]+)/uploadimage/$', goods.UploadImageView.as_view()),
    url(r'^(?P<version>[v1]+)/credential/$', goods.OssCredentialView.as_view()),
    url(r'^(?P<version>[v1]+)/shops/$', goods.ShopView.as_view({'get': 'list'})),
    url(r'^(?P<version>[v1]+)/register/$', auction.RegisterView.as_view()),
    url(r'^(?P<version>[v1]+)/login/$', auction.LoginView.as_view()),
    url(r'^(?P<version>[v1]+)/pwdchange/$', auction.PWDChangeView.as_view()),
    url(r'^(?P<version>[v1]+)/pwdforget/$', auction.PWDForgetView.as_view()),
    url(r'^(?P<version>[v1]+)/onlycheck/$', auction.OnlyCheckView.as_view()),
    url(r'^(?P<version>[v1]+)/Shops/$', shops.ShopManage.as_view({'post': 'create', 'get': 'list'})),
    url(r'^(?P<version>[v1]+)/Shops/(?P<pk>\d+)',
        shops.ShopManage.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'delete'})),
    url(r'^(?P<version>[v1]+)/report/$',
        reports.ShopReport.as_view({'post': 'list'})),
    url(r'^(?P<version>[v1]+)/goodreport/$',
        reports.GoodReport.as_view({'post': 'list'})),
    url(r'^(?P<version>[v1]+)/order/$', order.OrderView.as_view({'get': 'list', })),
    url(r'^(?P<version>[v1]+)/order/(?P<pk>\d+)$', order.OrderView.as_view({'get': 'retrieve', })),
    url(r'^(?P<version>[v1]+)/userreport/$',
        reports.UserReport.as_view({'post': 'list'})),
    url(r'^(?P<version>[v1]+)/notice_s/$', noticeS.s_NoticeManage.as_view({'get': 'list'})),
    url(r'^(?P<version>[v1]+)/user/$', user.UserView.as_view({'get': 'list', 'post': 'create', })),
    url(r'^(?P<version>[v1]+)/user/(?P<pk>\d+)$',
        user.UserView.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'delete'})),
    url(r'^(?P<version>[v1]+)/Staff/$', staff.StaffView.as_view({'post': 'create', 'get': 'list'})),
    url(r'^(?P<version>[v1]+)/Staff/(?P<pk>\d+)',
        staff.StaffView.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'delete'})),
]
# Eureka
# url(r"/",eureka.IndexHandler),
# url(r"/eatfun_backend", eureka.IndexHandler),
# url(r"eatfun_backend/actuator/info", eureka.ActuatorInfo.as_view()),
# url(r"eatfun_backend/actuator/health", eureka.ActuatorHealth.as_view())